<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        {
            let a = 1;
            var b = 2;
        }
        // console.log(a);
        // console.log(b);
        // for(let i = 0; i<5; i++) {
        
        // }
        // console.log(i);
        // for循环中 循环条件和循环体是独立的两个作用域，互不干扰
        for(let i = 0; i<5; i++) {
            let i = 'a'
            console.log(i);
        }
        // console.log(i);
    </script>
</body>
</html>